package fi.foyt.cs.persistence.domainmodel.oauth;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

import com.google.appengine.api.datastore.Key;


@Entity
public class AuthorizedClient {

  public Key getId() {
    return id;
  }
  
  public String getClientId() {
    return clientId;
  }
  
  public void setClientId(String clientId) {
    this.clientId = clientId;
  }
  
  public String getClientSecret() {
    return clientSecret;
  }
  
  public void setClientSecret(String clientSecret) {
    this.clientSecret = clientSecret;
  }
  
  public String getReturnUrl() {
    return returnUrl;
  }
  
  public void setReturnUrl(String returnUrl) {
    this.returnUrl = returnUrl;
  }
  
  public String getClientName() {
    return clientName;
  }
  
  public void setClientName(String clientName) {
    this.clientName = clientName;
  }
  
  public Boolean getAutoAcceptScopes() {
    return autoAcceptScopes;
  }
  
  public void setAutoAcceptScopes(Boolean autoAcceptScopes) {
    this.autoAcceptScopes = autoAcceptScopes;
  }
  
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private Key id;
  
  @Column (nullable = false)
  private String clientId;
  
  @Column (nullable = false)
  private String clientSecret;
  
  @Column (nullable = false)
  private String returnUrl;

  @Column (nullable = false)
  private String clientName;
  
  @Column (nullable = false)
  private Boolean autoAcceptScopes = Boolean.FALSE;
}